+2008-11-16 Øyvind Kolås <pippin@gimp.org>
+
+ * babl/babl-fish-stats.c: (legal_error), (each_conv): show in red the
+ conversions that are worse than the current BABL_TOLERANCE instead of
+ the earlier arbitrary 0.01.
+
2008-11-16 Martin Nordholts <martinn@svn.gnome.org>
* babl/babl-fish-path.c: Use the default babl tolerance level if
return 0;
}
+/* copied from babl-fish-path.c */
+#define BABL_LEGAL_ERROR 0.000001
+static double legal_error (void)
+{
+ static double error = 0.0;
+ const char *env;
+
+ if (error != 0.0)
+ return error;
+
+ env = getenv ("BABL_TOLERANCE");
+ if (env && env[0] != '\0')
+ error = atof (env);
+ else
+ error = BABL_LEGAL_ERROR;
+ return error;
+}
+
static int
each_conv (Babl *babl,
void *data)
error = babl_conversion_error (&babl->conversion);
cost = babl_conversion_cost (&babl->conversion);
- if (error > 0.01)
+ if (error > legal_error ())
{
fprintf (output_file, "<dt style='background-color: #fcc;'>%s</dt>", babl->instance.name);
fprintf (output_file, "<dd style='background-color: #fcc;'>");